Learning Cython Programming - Second Edition by Philip Herron

Learning Cython Programming - Second Edition by Philip Herron

Author:Philip Herron
Language: eng
Format: mobi, epub
Publisher: Packt Publishing
Published: 2016-02-21T22:00:00+00:00


We have to make sure that it is needed and compiled first. Remember that if we create public declarations, Cython generates a header for us. We will simply add our public header to tmux.h to keep headers very simple. Then, to make sure Cython files get picked up by automake and is compiled properly according to the correct dependency management at build time, we need to add the following:

SUFFIXES = .pyx .pyx.c: @echo " CPY " $< @cython -2 -o $@ $<

This adds in the suffix rule to make sure the *.pyx files are Cythoned and then told to compile the resulting .c file just as any normal C file. This snippet plays well if you happen to use AM_SILENT_RULES([yes]) in your autotools project, which formats the echo message correctly. Lastly, we need to make sure we add the necessary CFLAGS and LIBS options to the compiler from AC_SUBST in the configure script:

CFLAGS += $(PYINCS) tmux_LDADD = \ $(PYLIBS)



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.